<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="http://shiro.apache.org/tags" prefix="shiro"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html>
<html>

<head>

<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>博客数据</title>
<meta name="keywords" content="">
<meta name="description" content="">
<link rel="shortcut icon" href="favicon.ico">
<link href="${pageContext.request.contextPath}/css/github-gist.css" rel="stylesheet">
<link href="${pageContext.request.contextPath}/css/bootstrap.min.css" rel="stylesheet">
<link href="${pageContext.request.contextPath}/css/font-awesome.css" rel="stylesheet">
<link href="${pageContext.request.contextPath}/css/plugins/bootstrap-table/bootstrap-table.min.css" rel="stylesheet">
<link href="${pageContext.request.contextPath}/css/animate.css" rel="stylesheet">
<link href="${pageContext.request.contextPath}/css/style.css" rel="stylesheet">
<link href="${pageContext.request.contextPath}/css/index.css" rel="stylesheet">
<link href="${pageContext.request.contextPath}/css/base.css" rel="stylesheet">
<link href="${pageContext.request.contextPath}/css/fakeLoader.css" rel="stylesheet">
<link href="${pageContext.request.contextPath}/css/plugins/sweetalert/sweetalert.css" rel="stylesheet">
<link href="${pageContext.request.contextPath}/css/zTree/jquery.treegrid.css" rel="stylesheet" />
<link href="${pageContext.request.contextPath}/css/zTree/style.min.css" rel="stylesheet" />
<link href="${pageContext.request.contextPath}/css/layer.css" rel="stylesheet">
<link href="https://cdnjs.cloudflare.com/ajax/libs/fancybox/3.3.5/jquery.fancybox.css" rel="stylesheet">
<style>
.news_infos span {
	font-size: 13px;
}
</style>
</head>

<body class="white-bg" style="opacity:0">
	
	<div id="fakeloader"></div>
	<div class="wrapper wrapper-content">
	<div class="row">
		<div class="col-sm-3">
				<div class="ibox ibox-body">
					<div class="ibox-title">
						<h5>选择部门</h5>
					</div>
					<div class="ibox-content">
						<div id="jstree"></div>
					</div>
				</div>
			</div>
		
		<div class="col-sm-9">
		<div class="ibox float-e-margins">
			<div class="ibox-title">
				<h5>用户信息表格</h5>
				<div class="ibox-tools">
					<a class="collapse-link"> <i class="fa fa-chevron-up"></i>
					</a> 
					<!-- <a class="dropdown-toggle" data-toggle="dropdown" href="#"> <i
						class="fa fa-wrench"></i>
					</a> -->
					<!-- <ul class="dropdown-menu dropdown-user">
						<li><a href="#">选项1</a></li>
						<li><a href="#">选项2</a></li>
					</ul> -->
					<!-- <a class="close-link"> <i class="fa fa-times"></i> 
					</a>-->
				</div>
			</div>
			<div class="ibox-content">
				<div class="row row-lg">
					<div class="example">
						<table id="allBloger" data-mobile-responsive="true">

						</table>
						<shiro:hasPermission name = "sys:bloger:bloger">
						<div id="toolbar">
							<!-- <button class="type btn btn-outline btn-primary" type="button" id="typeButton" value="5">All</button> -->
							<button class="btn btn-outline btn-success" data-toggle="modal" data-target="#myModalAdd" type="button"  onclick="clearAdd()"  ><i class="fa fa-plus" ></i> 新增</button>
							<button class="type btn btn-outline btn-info" type="button" id="typeButton" value="1"><i class="fa fa-unlock-alt" ></i> 正常</button>
							<button class="type btn btn-outline btn-primary" type="button" id="typeButton" value="2"><i class="fa fa-lock" ></i> 已禁用</button>
							<button class="type btn btn-outline btn-danger" type="button" id="typeButton" value="-1"><i class="fa fa-trash" ></i>  回收站</button>
							<!-- <button class="type btn btn-outline btn-primary" type="button" id="typeButton" value="4">置顶</button> -->
							<div class="btn-group">
								<button data-toggle="dropdown" class="btn btn-outline btn-warning dropdown-toggle">
									角色 <span class="caret"></span>
								</button>
								<ul class="dropdown-menu">

								</ul>
							</div>
							
							<button class=" btn btn-danger" type="button"
								onclick="getSelectRows(1)">
								<i class="fa fa-remove"></i> 删除
							</button>
							<button class=" btn btn-primary" type="button"
								onclick="getSelectRows(2)">
								<i class="fa fa-lock"></i> 冻结
							</button>
							<!-- <button class=" btn btn-info" type="button"
								onclick="getSelectRows(3)">
								<i class="fa fa-cog"></i> 设为推荐
							</button> -->
						</div>
					</shiro:hasPermission>
					</div>
				</div>
				<!-- 修改 -->
				<div class="modal inmodal" id="myModal" tabindex="-2" role="dialog" aria-hidden="true">
					<div class="modal-dialog" style="width:702px">
						<div class="modal-content animated fadeInUp">
							<button type="button" class="close" style="margin-right:7px"
								data-dismiss="modal">
								<span aria-hidden="true">&times;</span><span class="sr-only">Close</span>
							</button>
							<div class="infos" style="margin:0px;">
								<div class="newsview" style="padding-top:0px;">
								<form class="form-horizontal m-t" id="signupForm">
						<input id="id" name="id" type="hidden">
						<div class="form-group">
							<label class="col-sm-3 control-label">头像：</label>
							<div class="col-sm-8">
							  <a  id="headImage" class="fancybox" href="#" data-fancybox="images">
								<img id="headImgUrl" alt="images" style="width: 64px; height: 64px;border-radius:10px;]" class="img-circle" src="#" />
							  </a>
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-3 control-label">姓名：</label>
							<div class="col-sm-8">
								<input id="name" name="name" class="form-control" type="text">
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-3 control-label">用户名：</label>
							<div class="col-sm-8">
								<input id="username" name="username" class="form-control" type="text" readonly="readonly">
							</div>
						</div>
						<div class="form-group">
								<label class="col-sm-3 control-label">部门：</label>
								<div class="col-sm-8">
									<input id="deptId" name="deptId" class="hidden">
									 <input onclick="selectDept()" id="deptName" name="deptName"
										class="form-control" type="text" style="cursor: pointer;"
										 readonly="readonly" placeholder="所属部门" >
								</div>
							</div>
						<div class="form-group">
							<label class="col-sm-3 control-label">E-mail：</label>
							<div class="col-sm-8">
								<input id="email" name="email" class="form-control" type="email">
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-3 control-label">状态:</label>
							<div class="col-sm-8" id="status">
								
							</div>
						</div>
						<div class="form-group" >
							<label class="col-sm-3 control-label">性别:</label>
							<div class="col-sm-8" id="sex">
								
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-3 control-label">角色:</label>
							<div class="col-sm-8" id="roleId">
								
							</div>
						</div>
						<!-- <input type="hidden" name="roleIds" id="roleIds"> -->
					</form>
								</div>
							</div>
							<div class="modal-footer">
								<span class="update"></span>
								<button type="button" class="btn btn-primary"
									data-dismiss="modal">关闭</button>
							</div>
						</div>
					</div>
				</div>
			<!-- 新增 -->
				<div class="modal inmodal" id="myModalAdd" tabindex="-1" role="dialog" aria-hidden="true">
					<div class="modal-dialog" style="width:702px">
						<div class="modal-content animated fadeInUp">
							<button type="button" class="close" style="margin-right:7px"
								data-dismiss="modal">
								<span aria-hidden="true">&times;</span><span class="sr-only">Close</span>
							</button>
							<div class="infos" style="margin:0px;">
								<div class="newsview" style="padding-top:0px;">
								<form class="form-horizontal m-t" id="signupForm2">
						<div class="form-group">
							<label class="col-sm-3 control-label"><span style="color: red;">*</span> 姓名：</label>
							<div class="col-sm-8">
								<input id="aname" name="name" required="required" class="form-control" type="text">
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-3 control-label"><span style="color: red;">*</span> 用户名：</label>
							<div class="col-sm-8">
								<input id="ausername" required="required" name="username" class="form-control" type="text">
							</div>
						</div>
						<div class="form-group" id="passwordInput">
							<label class="col-sm-3 control-label"><span style="color: red;">*</span> 密码：</label>
							<div class="col-sm-8">
								<input id="apassword" required="required" name="password" class="form-control" type="password">
							</div>
						</div>
						<div class="form-group">
								<label class="col-sm-3 control-label">部门：</label>
								<div class="col-sm-8">
									<input id="adeptId" name="adeptId" class="hidden">
									 <input onclick="selectDept()" id="adeptName" name="adeptName"
										class="form-control" type="text" style="cursor: pointer;"
										 readonly="readonly" placeholder="所属部门(点击选择)" >
								</div>
							</div>
						<div class="form-group">
							<label class="col-sm-3 control-label">E-mail：</label>
							<div class="col-sm-8">
								<input id="aemail" name="email" class="form-control" type="email">
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-3 control-label">状态:</label>
							<div class="col-sm-8" id="astatus">
								<label class="radio-inline">
								 	<input type="radio" name="astatus" checked="checked" value="1" /> 正常
							  	</label>
							  	<label class="radio-inline"> 
							  		<input type="radio" name="astatus" value="2" /> 禁用
							 	</label> 
							</div>
						</div>
						<div class="form-group" >
							<label class="col-sm-3 control-label">性别:</label>
							<div class="col-sm-8" id="asex">
								<label class="radio-inline"> 
									<input type="radio" name="asex" value="1" checked="checked" /> 男 
								</label>
								<label class="radio-inline"> 
									<input type="radio" name="asex" value="0" /> 女 
								</label> 
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-3 control-label">角色:</label>
							<div class="col-sm-8" id="aroleId">
								<!-- <label class="radio-inline"> 
									<input type="radio" name="aroleId" value="1" /> 超级管理员 
								</label>
								<label class="radio-inline">
								 	<input type="radio" name="aroleId" checked="checked" value="2" /> 普通用户
								</label>  -->
							</div>
						</div>
					</form>
								</div>
							</div>
							<div class="modal-footer">
								<span class="add">
								<button  class="J_menuItem btn btn-white" onclick="addBloger()">添加</button>
								</span>
								<button type="button" onclick="clearAdd()" class="btn btn-primary"
									data-dismiss="modal">关闭</button>
							</div>
						</div>
					</div>
				</div>
				<%--重置密码--%>
	
	<div id="resertPassword" class="modal fade" aria-hidden="true" style="z-index: 99999">
		<div class="modal-dialog" style="width: 25%;">
			<div class="modal-content">
				<div class="modal-body">

					<div class="row">
						<h3 class="m-t-none m-b">重置密码</h3>

						<form role="form" class="form-horizontal">
							<div class="input-group m-b">
								<span class="input-group-addon">新密码</span>
								 <input type="password" placeholder="请输入新密码" id="newpassword" value="" class="form-control">
							</div>
							<div id="update">
							<button id="resPassword" onclick="doModiPassword('${blogerRole.bloger.id}','${blogerRole.bloger.username}');" class="btn btn-sm btn-primary pull-right m-t-n-xs" style="margin-left:35px;" type="button">
							<strong>提交</strong>
							</button>
							</div>
							<div id="close">
							<button class="btn btn-sm btn-primary pull-right m-t-n-xs" data-toggle="modal" data-target="#resertPassword" type="button" >
							<strong>关闭</strong>
							</button>
							</div>
						</form>

					</div>
				</div>
			</div>
		</div>
	</div>
	
	
			</div>
		</div>
		</div>
	</div>
	</div>
<!-- 全局js -->
<script src="${pageContext.request.contextPath}/js/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/fancybox/3.3.5/jquery.fancybox.js"></script>
<script src="${pageContext.request.contextPath}/js/highlight.pack.js"></script>
<script>hljs.initHighlightingOnLoad();</script>
<script src="${pageContext.request.contextPath}/js/bootstrap.min.js"></script>

<!-- 自定义js -->
<script src="${pageContext.request.contextPath}/js/content.js"></script>
<script src="${pageContext.request.contextPath}/js/plugins/sweetalert/sweetalert.min.js"></script>
<script src="${pageContext.request.contextPath}/js/contabs.js"></script>
<script src="${pageContext.request.contextPath}/js/fakeLoader.min.js"></script>
<%-- <script src="${pageContext.request.contextPath}/js/layui.js"></script> --%>
<script src="${pageContext.request.contextPath}/js/layer.js"></script>
<!-- zTree -->
<script src="${pageContext.request.contextPath}/js/plugins/zTree/jstree.min.js"></script>
<script src="${pageContext.request.contextPath}/js/plugins/zTree/jquery.treegrid.min.js"></script>
<script src="${pageContext.request.contextPath}/js/plugins/zTree/jquery.treegrid.extension.js"></script>
<script src="${pageContext.request.contextPath}/js/plugins/zTree/jquery.treegrid.bootstrap3.js"></script>

<!-- Bootstrap table -->
<script src="${pageContext.request.contextPath}/js/plugins/bootstrap-table/bootstrap-table.min.js"></script>
<script src="${pageContext.request.contextPath}/js/plugins/bootstrap-table/bootstrap-table-mobile.min.js"></script>
<script src="${pageContext.request.contextPath}/js/plugins/bootstrap-table/locale/bootstrap-table-zh-CN.min.js"></script>
<script src="${pageContext.request.contextPath}/js/admin/system/blogers.js"></script>

</body>
</html>
